#pragma once
#include <string>
#include <functional>

class dvoPresenter
{
public:
  dvoPresenter() : name_("Unnamed"), tester_([](){return true;}), runner_([](){}) {}
  dvoPresenter(dvoPresenter&& item) : name_(std::forward<std::string>(item.name_)), tester_(item.tester_), runner_(item.runner_) {  }
  dvoPresenter(dvoPresenter& item) : name_(item.name_), tester_(item.tester_), runner_(item.runner_) {  }
  dvoPresenter(const std::string& name,  std::function<bool()> tester, std::function<void()> runner)
    : name_(name), tester_(tester), runner_(runner) {}
  inline bool Test() { return tester_(); }
  inline void Run() { runner_(); }
  inline const std::string& GetName() {return name_;}
private:
   std::string name_;
   std::function<bool()> tester_;
   std::function<void()> runner_;
};